<?php
namespace Common\Model;
use Think\Model;
class TagsModel extends Model{

	public function get_tags_list($module = '', $article_id = ''){
		$where['join_id'] = $article_id;
		$where['module']  = $module;
		$where['status']  = 1;
		$list = D('TagsJoin')->where($where)->select();
		foreach ($list as $rs) {
			$rs['content'] = D('Tags')->where(array('tags_id' => $rs['tags_id']))->getField('content');
			$new_list[] = $rs;
		}
		return $new_list ? $new_list : array();
	}
	public function get_hot_tag_list($module = ''){
		$where['module'] = $module;
		$where['is_hot'] = 1;
		$where['status'] = 1;
		$list = D('Tags')->where($where)->select();

		return $list ? $list : array();
	}
}
